package kr.bae.androidcomplete02.ch13;

import kr.bae.androidcomplete02.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.SeekBar;
import android.widget.TextView;

public class SeekBarEx extends Activity {
	SeekBar mSeekBar;
	TextView mVolume;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch13_seekbarex);
		
		mSeekBar = (SeekBar) findViewById(R.id.ch13_seekBar);
		mVolume = (TextView) findViewById(R.id.ch13_seek_volume);
		
		mSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
			
			@Override
			public void onStopTrackingTouch(SeekBar seekBar) {}
			
			@Override
			public void onStartTrackingTouch(SeekBar seekBar) {}
			
			@Override
			public void onProgressChanged(SeekBar seekBar, int progress,
					boolean fromUser) {
				mVolume.setText("Now Volume :" + progress);
			}
		});
		
	}
}
